﻿using System;

namespace H
{
	// Token: 0x0200026F RID: 623
	internal class H_State_Vomit : H_State
	{
		// Token: 0x06001054 RID: 4180 RVA: 0x00068524 File Offset: 0x00066724
		public H_State_Vomit(H_Members members) : base(members)
		{
		}

		// Token: 0x06001055 RID: 4181 RVA: 0x00068538 File Offset: 0x00066738
		public override void In(H_State.Message msg)
		{
			this.members.PlayAnime("Vomit", 0.2f);
			this.members.param.detail |= H_Parameter.DETAIL.VOMIT;
			this.members.param.mouth = H_MOUTH.FREE;
			this.members.VoiceExpression(H_Voice.TYPE.VOMIT);
			this.vomited = false;
			this.vomitTimer = 0f;
		}

		// Token: 0x06001056 RID: 4182 RVA: 0x000685A4 File Offset: 0x000667A4
		public override void Main()
		{
			this.vomitTimer += 1f;
			if (!this.vomited && this.vomitTimer >= this.vomitDelay)
			{
				this.Vomit();
			}
			if (this.members.CheckEndVoice())
			{
				if (!this.vomited)
				{
					this.Vomit();
				}
				base.ChangeState(H_STATE.VOMIT_WAIT);
			}
		}

		// Token: 0x06001057 RID: 4183 RVA: 0x00068610 File Offset: 0x00066810
		public override void Out()
		{
		}

		// Token: 0x06001058 RID: 4184 RVA: 0x00068614 File Offset: 0x00066814
		private void Vomit()
		{
			Female female = this.members.GetFemale(0);
			female.dripParticleMouth.Play();
			this.vomited = true;
		}

		// Token: 0x04001189 RID: 4489
		private float vomitDelay = 1f;

		// Token: 0x0400118A RID: 4490
		private bool vomited;

		// Token: 0x0400118B RID: 4491
		private float vomitTimer;
	}
}
